<div id="box" >
	<div class="padding">
		<form name="form-markinvoicesaspaid" id="form-markinvoicesaspaid" method="post" action="#">
		<table id="invoicetable" class="tablesorter">
			<thead>
				<tr class="header">
					<th>Projekt(e)</th><th width="25%">Kunde(n)</th><th width="10%">Status</th><th width="15%">geschrieben am</th><th width="10%">Aktion</th><th width="5%"></th>
				</tr>
			</thead>
			<tbody>
				<?php 
				foreach($this->invoices as $invoice) { ?>
				<tr class="trow" id="trow-<?php print($invoice['iid']); ?>" style="
				<?php if($invoice['datesent'] < (time() - $this->payment_target) && $invoice['status'] == Model_Invoice::STATUS_BILL) echo 'color:#f00;'; ?>
				">
					<td>
						<?php 
						foreach($invoice['projects'] as $project) {
							print($project['ptitle'].", "); 
						}
						?>
					</td>
					<td><?php print($invoice['ownerid']); ?></td>
					<td><?php print($invoice['status']); ?></td>
					<td><?php print(date("d.m.Y",$invoice['datesent'])); ?></td>
					<td><a target="_blank" href="/<?php print($invoice['pdflink']); ?>">herunterladen</a></td>
					<td align="center"><input name="<? print($invoice['iid']); ?>" type="checkbox" /></td>
				</tr>
				<?php } ?>				
			</tbody>
		</table>
		<table>
			<tr class="tablefooter">
				<td colspan="5" align="right">alle Rechnungen aus-/abwählen</td>
				<td align="center" width="5%"><input name="checkall" id="checkAllAuto" type="checkbox" value="checkall" /></td>
			</tr>
		</table>
		</form>
		<div class="submitbox" >
			<div class="submit">
				<p><a id="submit-markinvoicesaspaid" href="#"><?php echo $this->translate("Markierte Rechnungen als bezahlt markieren"); ?></a></p>
			</div>
		</div>
	</div>
</div>